package com.beordie.test.controller;

import com.beordie.annotation.BODAutowried;
import com.beordie.annotation.BODController;
import com.beordie.annotation.BODRequestMapping;
import com.beordie.annotation.BODRequestParam;
import com.beordie.test.service.BaseService;
import com.beordie.test.service.DemoService;
import com.beordie.version_2.mvc.BODModelAndView;

import java.nio.channels.NonWritableChannelException;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;

/**
 * @Description
 * @Date 2021/12/28 15:54
 * @Created 30500
 */
@BODController
@BODRequestMapping("demo")
public class DemoController {
    @BODAutowried
    private BaseService demoService;

    @BODRequestMapping("test")
    public BODModelAndView test(@BODRequestParam(name = "name") String name) {
        System.out.println(demoService);
        Map<String, Object> model = new HashMap<>();
        model.put("name", name);
        demoService.demoTest();
        return new BODModelAndView("500", model);
    }
}
